/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cnam.mobileshopping.ejb.list;

import java.util.List;
import javax.ejb.Local;
import org.cnam.mobileShopping.entity.MList;
import org.cnam.mobileShopping.entity.Productlist;
import org.cnam.mobileShopping.entity.Userlist;

/**
 *
 * @author Administrateur
 
 *
 **/
@Local
public interface MListLocal {
    
    List<MList> getLists(Integer userId);
    
    MList getList(Integer listId);
    
    MList addList(Integer userId, String label, String commonid, Short statusid, int version);
    
    void deleteList(String commonlistId, Integer userId);
    
    MList updateList(String commonlistId, String label, Short statusid, int version);
    
    Productlist addProductInList(String commonlistId, Integer productId, Integer userId, Integer quantity, String commonid, int version);
    
    List<Productlist> getProductsListByCommonId(String listId);
    
    List<Productlist> getProductsList(Integer listId);
    
    List<Userlist> getUsersList(Integer listId);

    Productlist updateProductInList(String commonProductListeId, Integer userId, Integer quantity, int status, int version);

    void deleteProductInList(String commonproductListeId, Integer userId);
    MList getListByCommonId(String commonlistId);
    
    List<MList> getListsForUser(Integer userId);

    public void sharedist(Integer userId, String commonlistid);
}
